<template>
	<view class="factory">
		<view class="link" v-for="item in factoryList" @click="to(item)" :key="item.id">
			<image class="fm" :src="item.phone+'?imageView2/1/w/125/h/125/q/85'" mode=""></image>
			<view class="right">
				<view class="name">
					{{item.name}}
				</view>
				<view class="address">
					<van-icon size="18" name="location-o" />
					<text>{{item.address}} </text>
				</view>
			</view>
		</view>
	</view>

</template>

<script>
	export default {
		data() {
			return {
				factoryList:[]
			}
		},
		onLoad() {
			this.getList();
		},
		onShareAppMessage(){
		},
		methods: {
			to(item) {
				uni.navigateTo({
					// url: '/pages/factory/detail?id='+item.id
					url: '/pages/factory/detail?id='+ item.id
				});
			},
			getList(){
				const requestParam = {
					url: "/app/mall/getMallMerchantInfoList",
					method: "GET",
					data:{
						pageNum: 1,
						pageSize:50,
					},
					callBack: (res) => {
						console.log(res)
						this.factoryList=res.rows;
					}
				}
				this.$request(requestParam);
			}
		}
	}
</script>

<style lang="scss">
	@import './style.scss';
</style>
